﻿using System;
using System.Data;
using System.Data.Common;
using Liger.Common;
using Liger.Data;

namespace EasyFMS.Model
{

	/// <summary>
	/// 实体类vEntityBill
	/// </summary>
	[Serializable]
	public class vEntityBill : Entity 
	{ 
		 public vEntityBill() 
            : base("vEntityBill") 
        { 

        }


		#region Model
		private int _UID;
		private int? _EntityID;
		private string _Short;
		private string _Code;
		private int? _BillingID;
		private string _BillingCode;
		private string _BillingName;
		private string _EntityCreate;
		private string _CreateDate;
	 
		/// <summary>
		/// 
		/// </summary>
		public int UID
		{
			get{ return _UID; }
			set
			{
				this.OnPropertyValueChange(_.UID,_UID,value);
				this._UID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? EntityID
		{
			get{ return _EntityID; }
			set
			{
				this.OnPropertyValueChange(_.EntityID,_EntityID,value);
				this._EntityID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Short
		{
			get{ return _Short; }
			set
			{
				this.OnPropertyValueChange(_.Short,_Short,value);
				this._Short = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Code
		{
			get{ return _Code; }
			set
			{
				this.OnPropertyValueChange(_.Code,_Code,value);
				this._Code = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? BillingID
		{
			get{ return _BillingID; }
			set
			{
				this.OnPropertyValueChange(_.BillingID,_BillingID,value);
				this._BillingID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string BillingCode
		{
			get{ return _BillingCode; }
			set
			{
				this.OnPropertyValueChange(_.BillingCode,_BillingCode,value);
				this._BillingCode = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string BillingName
		{
			get{ return _BillingName; }
			set
			{
				this.OnPropertyValueChange(_.BillingName,_BillingName,value);
				this._BillingName = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string EntityCreate
		{
			get{ return _EntityCreate; }
			set
			{
				this.OnPropertyValueChange(_.EntityCreate,_EntityCreate,value);
				this._EntityCreate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CreateDate
		{
			get{ return _CreateDate; }
			set
			{
				this.OnPropertyValueChange(_.CreateDate,_CreateDate,value);
				this._CreateDate = value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.UID,
				_.EntityID,
				_.Short,
				_.Code,
				_.BillingID,
				_.BillingCode,
				_.BillingName,
				_.EntityCreate,
				_.CreateDate
			};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				_UID,
				_EntityID,
				_Short,
				_Code,
				_BillingID,
				_BillingCode,
				_BillingName,
				_EntityCreate,
				_CreateDate
			};
		} 
		/// <summary>
		/// 设置字段值
		/// </summary>
		public override void SetValue(string fieldName, object value)
        {
            switch (fieldName)
            { 
				case "UID":
                    this._UID = DataHelper.ConvertValue<int>(value);
                    break; 
				case "EntityID":
                    this._EntityID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "Short":
                    this._Short = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Code":
                    this._Code = DataHelper.ConvertValue<string>(value);
                    break; 
				case "BillingID":
                    this._BillingID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "BillingCode":
                    this._BillingCode = DataHelper.ConvertValue<string>(value);
                    break; 
				case "BillingName":
                    this._BillingName = DataHelper.ConvertValue<string>(value);
                    break; 
				case "EntityCreate":
                    this._EntityCreate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "CreateDate":
                    this._CreateDate = DataHelper.ConvertValue<string>(value);
                    break; 
            }
        }
		/// <summary>
		/// 获取字段值
		/// </summary>
        public override object GetValue(string fieldName)
        {
            switch (fieldName)
            { 
				case "UID":
                    return this._UID; 
				case "EntityID":
                    return this._EntityID; 
				case "Short":
                    return this._Short; 
				case "Code":
                    return this._Code; 
				case "BillingID":
                    return this._BillingID; 
				case "BillingCode":
                    return this._BillingCode; 
				case "BillingName":
                    return this._BillingName; 
				case "EntityCreate":
                    return this._EntityCreate; 
				case "CreateDate":
                    return this._CreateDate; 
				default :
                    return null;
            } 
        }



		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","vEntityBill");
 
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UID = new Field("UID","vEntityBill","UID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field EntityID = new Field("EntityID","vEntityBill","EntityID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Short = new Field("Short","vEntityBill","Short");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Code = new Field("Code","vEntityBill","Code");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field BillingID = new Field("BillingID","vEntityBill","BillingID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field BillingCode = new Field("BillingCode","vEntityBill","BillingCode");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field BillingName = new Field("BillingName","vEntityBill","BillingName");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field EntityCreate = new Field("EntityCreate","vEntityBill","EntityCreate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CreateDate = new Field("CreateDate","vEntityBill","CreateDate");
		}
		#endregion

 
	}
}

